import server from "./axios";
interface ResponseData{
    code:number,
    message:string,
    data:any
}
// get请求 返回的是类型是Promise里面的类型是ResponseData
function get(url:string,params?:any):Promise<ResponseData>{
    console.log({params})
    return server.get(url,{params})
}
function post(url:string,data?:any):Promise<ResponseData>{
    return server.post(url,data)
}
export {get,post}